namespace Test.ConsoleProgram.Algorithm.Work
{
    [TestDescription("工作逻辑: 静态扩展方法参数调用")]
    public class Test_StaticArgsUse : AbsBaseTestItem
    {
        public override void OnTest()
        {
            Assert.TestExe(() => new BaseModel().GetStr(), "BaseModel");
            Assert.TestExe(() => new GreamModel().GetStr(), "GreamModel");

            Assert.TestExe(() =>
            {
                BaseModel m = new GreamModel();
                return m.GetStr();
            }, "BaseModel");
        }
    }

    internal class BaseModel { }
    internal class GreamModel : BaseModel { }
    internal static class Expand
    {
        public static string GetStr(this BaseModel m) => "BaseModel";
        public static string GetStr(this GreamModel m) => "GreamModel";
    }
}
